package com.teddy.DTXMB.Service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.teddy.DTXMB.Mapper.ProductMapper;
import com.teddy.DTXMB.Model.Product;
import com.teddy.DTXMB.Service.ProductService;


@Service
public class ProductServiceImpl implements ProductService{
	
	@Autowired 
	private ProductMapper productMapper;

	public Product getProductByID(int id){
		return productMapper.selectProductByID(id);
	}

	public List<Product> getAllProduct() {
		
		return productMapper.selectAllProduct();
	}

	public List<Product> getFeatureProduct() {
		return productMapper.selectFeatureProduct();
	}

	public Product getHotProduct() {
		return productMapper.selectHotProduct();
	}

}
